Add datashare support to the template repo#61
Conversation
PR SummaryMedium Risk Overview Introduces a new macro ( Adds a datashare-enabled incremental template model plus schema docs/tests, and updates Written by Cursor Bugbot for commit 3e37243. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Inconsistent string coercion for
full_refreshparameter- Added the same string coercion logic (
full_refresh is string and full_refresh | lower in ['true', '1', 'yes', 'y']) to theis_full_refreshassignment on line 110, matching the existing pattern used fordry_runon line 128.
- Added the same string coercion logic (
Or push these changes by commenting:
@cursor push 327bd0c901
Preview (327bd0c901)
diff --git a/macros/dune_dbt_overrides/datashare_table_sync_post_hook.sql b/macros/dune_dbt_overrides/datashare_table_sync_post_hook.sql
--- a/macros/dune_dbt_overrides/datashare_table_sync_post_hook.sql
+++ b/macros/dune_dbt_overrides/datashare_table_sync_post_hook.sql
@@ -107,7 +107,7 @@
{%- set node_config = node.config if node.config is mapping else {} -%}
{%- set materialized = node_config.get('materialized', 'view') -%}
{%- set table_name = node.alias if node.alias is not none else node.name -%}
- {%- set is_full_refresh = materialized == 'table' or full_refresh is sameas true -%}
+ {%- set is_full_refresh = materialized == 'table' or full_refresh is sameas true or (full_refresh is string and full_refresh | lower in ['true', '1', 'yes', 'y']) -%}
{%- set sql = _datashare_table_sync_sql(
schema_name=node.schema,You can send follow-ups to this agent here.
Comment @cursor review or bugbot run to trigger another review on this PR
3e37243 to
a543fb4
Compare


Adds the validated datashare macro and post-hook to
dune-dbt-template, plus an opt-in example model and repo-local setup guide. This keeps datashare support discoverable in the public template without syncing dev or PR schemas by default.ALTER TABLE ... EXECUTE datashare(...)macro and wire it intodbt_project.ymlprodso temporary schemas stay local